package com.bole.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
@CrossOrigin
@Controller
public class IndexController {
    @RequestMapping("/index")
    public String toIndex() {
        return "index";
    }

    @RequestMapping("/toUserCollection")
    public String toUserCollection() {
        return "user_collection";
    }

    @RequestMapping("/toUserMessagePage")
    public String toUserMessagePage() {
        return "user_leave_message";
    }

    @RequestMapping("/reply/{buyUserId}/{pid}")
    public String toReplyPage(@PathVariable Long buyUserId,@PathVariable("pid") String pid, Model model) {
        model.addAttribute("buyUserId", buyUserId);
        model.addAttribute("pid",pid);
        return "reply";
    }

    @RequestMapping("/toUserSellInfo")
    public String toUserSellInfo() {
        return "user_sell_info";
    }
}
